<?php
	require "../modules/conn.php";
	session_start();
	$uid=$_SESSION["uid"];
	$sid=$_SESSION["sid"];
	$sql2="select s.sid,s.title,s.price,s.curr,i.imgid from t_sell s,t_watch w,t_image i where s.sid=i.s_img_id and s.sid=w.w_sell_id and w_user_id=$uid group by s.sid";
	// echo $sql2;
	$result2=mysqli_query($conn,$sql2);
	if($result2){
		$arr=array();
		while($row2=mysqli_fetch_assoc($result2)){
			array_push($arr,$row2);
		}
		// print_r($arr);
		echo json_encode($arr);
		// echo "asd";
	}else{
		echo "error";
	}
?>